﻿<UserControl
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:local="clr-namespace:PokerTimer"
    xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
	xmlns:data="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data"
	x:Class="PokerTimer.MainPage" Loaded="UserControl_Loaded">
    
    <UserControl.Resources>
        <DataTemplate x:Key="itemTemplate">
            <TextBlock Text="{Binding Big}" />
        </DataTemplate>
        <Storyboard x:Name="HoverFocus">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="ControlBlock">
                <EasingDoubleKeyFrame KeyTime="0" Value="0.1"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Name="HoverUnfocus">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="ControlBlock">
                <EasingDoubleKeyFrame KeyTime="0" Value="1"/>
                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="0.1"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
    </UserControl.Resources>

    <Canvas x:Name="LayoutRoot" HorizontalAlignment="Center"
            MouseRightButtonDown="LayoutRoot_MouseRightButtonDown"
            MouseRightButtonUp="LayoutRoot_MouseRightButtonUp">

        <local:FullBaizeControl Canvas.Left="-1000"/>

        <data:DataGrid Visibility="Collapsed" x:Name="BlindsGrid" Height="135" Width="395" Canvas.Left="-599" Canvas.Top="26"
                       ItemsSource="{Binding}" FontSize="20" AutoGenerateColumns="False">
            <data:DataGrid.Columns>
                <data:DataGridTextColumn Header="Big" Binding="{Binding Big}" />
                <data:DataGridTextColumn Header="Small" Binding="{Binding Small}" />
            </data:DataGrid.Columns>
        </data:DataGrid>

        <local:CurrentBlindsControl Visibility="Visible"  x:Name="currentBlindsControl" FontSize="64"
                                    Canvas.Left="-774" Canvas.Top="26" Height="231" Width="1600" RenderTransformOrigin="0.5,0.5">
            <local:CurrentBlindsControl.RenderTransform>
                <CompositeTransform ScaleY="1.2" ScaleX="1.2"/>
            </local:CurrentBlindsControl.RenderTransform>
        </local:CurrentBlindsControl>

        <StackPanel Orientation="Vertical" Canvas.Top="220" Canvas.Left="-850" HorizontalAlignment="Center" Width="1800">
            <TextBlock x:Name="CountdownText" FontFamily="Fonts/Fonts.zip#Digital-7" FontSize="600"
			                Foreground="#FFE2D446" Loaded="CountdownText_Loaded" Text="XX:XX" RenderTransformOrigin="0.5,0.5">
            	<TextBlock.RenderTransform>
            		<CompositeTransform ScaleX="1.1" ScaleY="1.1"/>
            	</TextBlock.RenderTransform>
			<TextBlock.Effect>
				<DropShadowEffect BlurRadius="55" ShadowDepth="9" Direction="270"/>
			</TextBlock.Effect>
            </TextBlock>

            <Grid x:Name="ControlBlock" Background="#FF98E58D" Width="240" Opacity="0.1" MouseEnter="ControlBlock_MouseEnter" MouseLeave="ControlBlock_MouseLeave">
                <Grid.Effect>
                    <DropShadowEffect BlurRadius="55" ShadowDepth="9" Direction="270"/>
                </Grid.Effect>
                <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <TextBlock Padding="5" Grid.Row="0" Grid.Column="0" Text="Minutes:" FontSize="24" HorizontalAlignment="Right"/>
                <TextBox x:Name="RoundDuration" FontSize="24" Padding="4" Grid.Row="0" Grid.Column="1" Width="100" HorizontalAlignment="Right"/>
                <StackPanel Grid.Row="1" Grid.ColumnSpan="2" Grid.Column="0" Canvas.Top="50" Canvas.Left="10" Orientation="Horizontal" Background="Black" >
                    <Button FontSize="22" Width="80" Height="50" Padding="7" x:Name="PlayButton" Content="Play" Click="PlayButton_Click"/>
                    <Button FontSize="22" Width="80" Height="50" x:Name="ResetButton" Content="Reset" Click="ResetButton_Click"/>
                    <Button FontSize="22" Width="80" Height="50" x:Name="FullScreenButton" Click="FullScreenButton_Click">
                        <Button.Content>
                            <Path x:Name="Path_12" Width="45" Height="45" Canvas.Left="154.873" Canvas.Top="100.18" Stretch="Fill" Fill="#FFFFEF49" Data="F1 M 496.999,723.112L 494.319,720.434L 503.946,710.806L 478.55,710.806L 478.55,707.019L 503.946,707.019L 494.319,697.392L 496.999,694.712L 511.198,708.912L 508.519,711.591M 495.962,678.849L 465.898,708.912L 495.962,738.974L 526.024,708.912L 495.962,678.849 Z " UseLayoutRounding="False" RenderTransformOrigin="0.5,0.5">
                                <Path.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform/>
                                        <SkewTransform/>
                                        <RotateTransform Angle="-45"/>
                                        <TranslateTransform/>
                                    </TransformGroup>
                                </Path.RenderTransform>
                            </Path>
                        </Button.Content>
                    </Button>
                </StackPanel>
            </Grid>
        </StackPanel>
        <MediaElement x:Name="DingMedia" Height="66" Width="110" Canvas.Left="408" Canvas.Top="26" Source="/Assets/DingDing.wma" Volume="1" AutoPlay="False"/>

    </Canvas>
</UserControl>